<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <title>我的钱包</title>
</head>
<body>
<article class="viewports">
    <div class="member_info">
        <div class="num_value layout-box tac c-ffaa3b ptb20">
            <div class="box-col">${user.accountBalance}<p class="cf">我的余额</p></div>
            <div class="box-col">${user.commissionBalance}<p class="cf">佣金收入</p></div>
            <div class="box-col">${user.integralBalance}<p class="cf">我的积分</p></div>
        </div>
    </div>
    <a href="${ctx}/user/withdraw">
        <div class="tac">
            <button class="i_btn b-2db22d cf r5 lh2 fs32 plr75">提现</button>
        </div>
    </a>
    <div class="tab_menu">
        <div class="mt layout-box b-ffffff tac odr_b">
            <a class="box-col " href="${ctx}/user/account_details">账户明细</a>
            <a class="box-col " href="${ctx}/user/integral">积分明细</a>
            <a class="box-col curr" href="${ctx}/user/commission">佣金收入</a>
            <a class="box-col" href="${ctx}/user/withdrawals_record">提现记录</a>
        </div>
        <ul class="mc list_item c6">
            <c:forEach var="item" items="${userCommissionList}">
                <li class="plr30">
                    <c:choose>
                        <c:when test="${item.type==1}">
                            <div class="layout-box">
                                <div class="box-col"><span class="c-cb1448">+ ${item.commission}</span></div>
                                <div class="box-col"><span>
                                <c:choose>
                                    <c:when test="${item.source==1}">
                                        推荐开微店
                                    </c:when>
                                </c:choose>
                            </span></div>
                                <div class="box-col"><span><fmt:formatDate value="${item.createOn}" type="date"/></span></div>
                            </div>
                        </c:when>
                        <c:when test="${item.type==2}">
                            <div class="layout-box">
                                <div class="box-col"><span class="c0">- ${item.commission}</span></div>
                                <div class="box-col"><span><c:choose>
                                    <c:when test="${item.source==2}">
                                        消费
                                    </c:when>
                                </c:choose></span></div>
                                <div class="box-col"><span><fmt:formatDate value="${item.createOn}" type="date"/></span></div>
                            </div>
                        </c:when>
                    </c:choose>
                </li>
            </c:forEach>

        </ul>
    </div>
</article>
</body>
</html>